const sq = require('./index');
const { DataTypes } = require('sequelize');
const UserInfo = sq.define('UserInfo', {
    userName: {
        type: DataTypes.STRING,
        allowNull: false,
        comment: '用户名'
    },
    userSex: {
        type: DataTypes.STRING,
        values: [1, 0],
        defaultValue: 1,
        allowNull: false,
        comment: '1:男 0:女'
    },
    userMail: {
        type: DataTypes.STRING,
        allowNull: false,
        comment: "用户邮箱"
    },
    userAvatar: {
        type: DataTypes.STRING,
        allowNull: false,
        comment: '用户头像'
    },
    userSignature: {
        type: DataTypes.STRING,
        comment: '用户签名',
        allowNull: true,
    },
    userPatInfo: {
        type: DataTypes.STRING,
        comment: '拍一拍的语言，默认为 “xxx拍了拍xxx的脑袋”',
        defaultValue: 'xxx拍了拍脑袋'
    }
}, {
    freezeTableName: true,
});
//UserInfo.sync({ force: true })
module.exports = UserInfo
